* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  width: 400px;
  min-height: 500px;
  background: #0f0f0f;
  color: #ffffff;
  overflow: hidden;
}

.container {
  background: #0f0f0f;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 600px;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 80px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
}

.practices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 15px;
}

.practice-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  transition: all 0.3s;
  margin-bottom: 12px;
}

.practice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.practice-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.practice-content {
  flex: 1;
  color: white;
}

.practice-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: white;
}

.practice-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 12px;
}

.practice-btn {
  background: white;
  color: #667eea;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.practice-btn:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

.practice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.practice-item:last-child {
  border-bottom: none;
}

.practice-name {
  font-size: 16px;
  color: #ffffff;
  flex: 1;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  margin-right: 12px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #4caf50;
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.play-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.play-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 8px solid #ffffff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

.ai-card {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.ai-card-content {
  position: relative;
  z-index: 2;
}

.ai-sparkles {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 14px;
  opacity: 0.6;
  z-index: 3;
}

.ai-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.ai-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.ai-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  line-height: 1.5;
}

.activate-btn {
  background: #ffd700;
  color: #000000;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.activate-btn:hover {
  background: #ffed4e;
  transform: translateY(-1px);
}

.activate-btn:active {
  transform: translateY(0);
}

.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
  flex: 1;
  gap: 4px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
}

/* Tab Content Styles */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content.hidden {
  display: none !important;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h2 {
  font-size: 18px;
  color: #ffffff;
}

.btn-primary {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #5568d3;
}

.content-list, .reminders-list, .news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.content-card:hover {
  background: #222222;
  border-color: rgba(255, 255, 255, 0.2);
}

.content-card h3 {
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.content-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  margin-bottom: 8px;
}

.content-card .category {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 6px;
}

.content-card .references {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.content-card .references a {
  font-size: 11px;
  color: #8b9aff;
  text-decoration: none;
  display: block;
  margin-top: 4px;
}

.content-card .references a:hover {
  text-decoration: underline;
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
}

.favorite-btn.active {
  color: #ffd700;
}

.reminder-item {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-item .reminder-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reminder-item .reminder-info h3 {
  font-size: 15px;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.reminder-item .reminder-info h3 span:first-child {
  font-size: 18px;
  flex-shrink: 0;
}

.reminder-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.reminder-item .reminder-info .frequency {
  font-size: 11px;
  color: #8b9aff;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 154, 255, 0.1);
  border: 1px solid rgba(139, 154, 255, 0.3);
  font-weight: 500;
  white-space: nowrap;
}

.reminder-item .reminder-info .frequency:hover {
  background: rgba(139, 154, 255, 0.2);
  border-color: rgba(139, 154, 255, 0.5);
}

.reminder-item .reminder-info .frequency .edit-icon {
  font-size: 10px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.reminder-item .reminder-info .frequency:hover .edit-icon {
  opacity: 1;
}

.frequency-container {
  display: inline-block;
  position: relative;
}

.reminder-footer .frequency-container {
  flex: 1;
  min-width: 0;
}

.reminder-timer {
  font-size: 11px;
  color: #8b9aff;
  font-weight: 600;
  padding: 4px 8px;
  background: rgba(139, 154, 255, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(139, 154, 255, 0.3);
  display: inline-block;
  white-space: nowrap;
  min-width: 60px;
  text-align: center;
  flex-shrink: 0;
}

.frequency-editor {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  margin-top: 4px;
  z-index: 10;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  min-width: 200px;
  pointer-events: auto;
}

.frequency-presets {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.frequency-preset {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
  min-width: 40px;
  text-align: center;
  user-select: none;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.frequency-preset:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #4caf50;
  transform: translateY(-1px);
}

.frequency-preset:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.25);
}

.frequency-preset.active {
  background: #4caf50;
  color: white;
  border-color: #4caf50;
}

.frequency-custom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.frequency-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 11px;
  max-width: 80px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.frequency-input:focus {
  outline: none;
  border-color: #667eea;
}

.frequency-unit {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
}

.setting-info h3 {
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 4px;
  font-weight: 600;
}

.setting-info p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.setting-select {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  cursor: pointer;
  min-width: 120px;
}

.setting-select:focus {
  outline: none;
  border-color: #667eea;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.modal-content {
  background-color: #1a1a1a;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.close {
  color: rgba(255, 255, 255, 0.7);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 15px;
}

.close:hover {
  color: #ffffff;
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #ffffff;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-content input,
.modal-content textarea {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.modal-content textarea {
  resize: vertical;
}

.modal-content label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #ffffff;
}

.modal-content input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.modal-content label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.empty-state p {
  font-size: 14px;
  margin-top: 10px;
}

/* Scrollbar styling */
.main-content::-webkit-scrollbar {
  width: 6px;
}

.main-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.main-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* News Card Styles */
.news-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card:hover {
  background: #222222;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.news-image {
  width: 100%;
  height: 150px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.news-category {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.news-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.news-card h3 {
  font-size: 15px;
  color: #ffffff;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  line-height: 1.4;
}

.news-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.news-source {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
